package com.kehutong.employee.enums;

import org.coraframework.util.HashID;

/**
 * 性别
 * @Author: liuzhen (liuxing521a@163.com)
 * @Date: 2021/2/9 上午10:12
 */
public enum Identity implements HashID {

    EMPLOYEE("0", "普通员工"),
    LEAD("1", "上级")
    ;

    private final String id;
    private final String desc;

    private Identity(String id, String desc) {
    	this.id = id;
        this.desc = desc;
    }

    public static Identity getIdentity(String desc) {
        Identity[] identitys = values();
        for (Identity identity : identitys) {
            if (identity.getDesc().equals(desc)) {
                return identity;
            }
        }
        return null;
    }


    @Override
    public String getId() {
        return id;
    }

	@Override
    public String getDesc() {
        return desc;
    }
    
}
